package org.fone.utils.task.data;

public enum SeniorType {
    ADD("add","add"),
    ADD_LEFT("add_left","add_left"),
    ADD_RIGHT("add_right","add_right"),
    SUB("sub","sub"),
    INSERT("insert","insert");

    public final String TYPE;
    public final String VALUE;

    public String getTYPE() {
        return TYPE;
    }

    public String getVALUE() {
        return VALUE;
    }

    SeniorType(String TYPE, String VALUE) {
        this.TYPE = TYPE;
        this.VALUE = VALUE;
    }

    public static SeniorType getTypeByValue(String value){
        if (null == value){
            return null;
        }
        for (SeniorType enums : SeniorType.values()) {
            if (enums.getVALUE().equals(value)) {
                return enums;
            }
        }
        return null;
    }
}
